<?php

$date_picker->__dateFormat = "yy-mm-dd";
echo "<scr" . "ipt type=\"text/javascript\">";
$date_picker->generateDP("srcPeriodStart");
$date_picker->generateDP("srcPeriodEnd");
echo "</scr" . "ipt>";
$date_picker->init();
?>

<?php echo $breadcrumb; ?>

<style>
    .GridTableFilter select{padding: 3px;}
    .GridTableFilter input[type=text]{padding: 5px 4px 4px 4px !important;}
    .GridTableFilter input[type=submit]{padding: 5px 4px 4px 20px !important; width:50px}
</style>

<div id="content">
    <div class="DivTable">
        <form name="fCari" id="fCari" action="" method="get" >
            <table class="GridTableFilter">
                
                <tr class="GridHeader">
                    <td>Jumlah Saldo Saat Ini</td>
                    <td>:</td>
                    <td>
                        <?php
                            echo number_format($saldo);
                        ?>
                    </td>
                </tr>
                <tr class="GridHeader">
                    <td>Jumlah Saldo Awal Bulan <?=$bulan?></td>
                    <td>:</td>
                    <td>
                        <?php
                            echo number_format($saldo_awal_bulan);
                        ?>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 5px 0px;">
                        <input class="read-only" type="text" name="srcPeriodStart" id="srcPeriodStart" value="<?php echo $srcPeriodStart; ?>" maxlength="10" size="10" readonly="readonly"  />
                        <span style="font-size:12px">Sampai</span>
                        <input class="read-only" type="text" name="srcPeriodEnd" id="srcPeriodEnd" value="<?php echo $srcPeriodEnd; ?>" maxlength="10" size="10" readonly="readonly"  />
                        <?php 
                            if ($srcPeriodMode == "include"){
                                echo '<input type="checkbox" name="srcPeriodMode" value="include" checked> Sertakan';
                            } else {
                                echo '<input type="checkbox" name="srcPeriodMode" value="include"> Sertakan';
                            }
                        ?>                        
                    </td>
                </tr>
                <?php echo $filter_panel->drawfilterpanel(); ?>
                <tr>
                    <td><?php echo $filter_panel->drawfilterpanelsingle(); ?></td>
                </tr>
            </table>
        </form>
        <br class="bersih" />        
        <?php $this->datagrid->render(); ?>
    </div>
    <br class="bersih" />
</div>

<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery(".tr_slide").hide();

        jQuery('.search').click(
            function(){
                jQuery(".tr_slide").slideToggle();
            }
        );
    });

    function edit(kode){
        return GB_showCenter('Ubah Kas Penjualan', '<?php echo base_url(); ?>index.php/kas/kas_operasional_add/'+kode, 520, 850);
    }
    
    function hapus(kode, qs){        
        if(confirm("apakah anda yakin akan menghapus data ini?"))
            location.href = '<?=site_url("kas/kas_operasional_delete")?>/'+kode+'/?'+qs;
    }
</script>
